/**
 * @Description 问题的service操作
 * @author 20155872 游宇
 * @create 2018-05-10 11:31
 **/

package com.campus_information_portal.service;

import com.campus_information_portal.entity.Question;
import com.campus_information_portal.util.Msg;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @className QuestionService
 * @Description 问题的service操作
 * @author 20155872 游宇
 * @create 2018-05-10 11:31
 **/
@Service
public interface QuestionService {

    /**
     * @Description: 发布新的评价问题，往数据库中添加一条记录
     * @author: 20155872 游宇
     * @methodName: addQuestion
     * @param: Question question
     * @returnType: Msg
     * @createTime: 2018/5/14 10:46
     **/
    Msg addQuestion(Question question);

    /**
     * @Description: 更新评价的问题
     * @author: 20155872 游宇
     * @methodName:
     * @param:
     * @returnType:
     * @createTime:
     **/
    Msg updateQuestion(Question question);

    /**
     * @Description: 根据questionid来获取一条question记录
     * @author: 20155872 游宇
     * @methodName: getQuestion
     * @param: int questionId
     * @returnType: Question
     * @createTime:
     **/
    Msg getQuestion(int questionId);

    /**
     * @Description: 查看所有的评价问题
     * @author: 20155872 游宇
     * @methodName: findAllQuestion
     * @param: null
     * @returnType: List<Question>
     * @createTime:
     **/
    Msg findAllQuestion();

    /**
     * @Description: 根据termid 来查看评价问题
     * @author: 20155872 游宇
     * @methodName: findQuestionByTermid
     * @param: int term_id
     * @returnType: Question
     * @createTime: 2018-05-10 10:57
     **/
    Msg findQuestionByTermid(int term_id);

    /**
     * @Description: 清空评价问题表中的所有记录
     * @author: 20155872 游宇
     * @methodName: findQuestionByTermid
     * @param: int term_id
     * @returnType: boolean
     * @createTime: 2018-05-10 10:57
     **/
    Msg deleteAllQuestion();

    /**
     * @Description: 根据评价问题记录id删除评价问题记录
     * @author: 20155872 游宇
     * @methodName: deleteQuestionByQuestion_id
     * @param: int question_id
     * @returnType: boolean
     * @createTime: 2018-05-10 10:57
     **/
    Msg deleteQuestionByQuestion_id(int question_id);

}
